Skip to content

docs(mcp-oauth): document oauth2_flow as required for oauth2 MCP servers - #505

Merged
tin-berri merged 1 commit into
mainfrom
litellm_docs-mcp-oauth2-flow-required
Jul 8, 2026
Merged

docs(mcp-oauth): document oauth2_flow as required for oauth2 MCP servers#505
tin-berri merged 1 commit into
mainfrom
litellm_docs-mcp-oauth2-flow-required

Conversation

@tin-berri

@tin-berri tin-berri commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

Updates every auth_type: oauth2 MCP server config example to include the now-required oauth2_flow field, and corrects the config reference to match current behavior.

Since BerriAI/litellm#32292, an auth_type: oauth2 server in config.yaml must declare oauth2_flow: client_credentials (M2M) or oauth2_flow: authorization_code (interactive PKCE, including delegate_auth_to_upstream). The proxy raises a ValueError at startup when the field is missing or invalid, and no longer infers the flow from field shape for config entries. Only legacy DB rows created before the field existed still fall back to shape inference at request time.

Without this change, every oauth2 config example in the docs fails proxy startup on current builds.

Resolves LIT-4251

Changes

docs/mcp_oauth.md: adds an oauth2_flow column to the flow comparison table so the interactive flow visibly maps to authorization_code; adds the field to the interactive setup, M2M setup, mock-server test config, and delegate-auth examples; rewrites the oauth2_flow config reference row from optional-with-inference to required; adds the field to the delegate section's config reference.

docs/mcp_control.md, docs/tutorials/claude_mcp.md, docs/mcp.md: adds oauth2_flow to the remaining oauth2 examples (authorization_code for all; they are interactive GitHub/Atlassian setups) and a sentence in mcp.md stating the flow must be declared.

Screenshots

Each pair below renders the affected doc section from a local Docusaurus build, main on the left and this branch on the right.

docs/mcp_oauth.md

The flow comparison table gains an oauth2_flow column so each flow visibly maps to its config value.

flow comparison table

The config reference row for oauth2_flow moves from optional with shape inference to required, and states that the proxy refuses to start when it is missing.

oauth2_flow config reference

The interactive PKCE and machine-to-machine setup examples now declare the flow explicitly.

interactive PKCE example

M2M example

The delegate-auth example and its config reference add oauth2_flow: authorization_code, since delegated servers are interactive.

delegate example

delegate config reference

docs/mcp.md, docs/mcp_control.md, docs/tutorials/claude_mcp.md

The remaining oauth2 examples across these pages pick up the field, and the mcp.md overview adds a sentence explaining that the flow must be declared.

mcp.md overview example

mcp_control.md example

claude_mcp.md example

Note on timing

This documents the behavior on litellm_internal_staging (required-in-config landed 2026-07-07). If the docs site should track the latest stable release, hold merging until that change ships; the examples themselves are forward-compatible either way since the field is accepted on older versions that still infer.

🤖 Generated with Claude Code

Link to Devin session: https://app.devin.ai/sessions/f03da2725ec94d28b3facf766871b102

auth_type: oauth2 servers in config.yaml now require an explicit
oauth2_flow (client_credentials or authorization_code); the proxy
raises at startup when it is missing and no longer infers the flow
from field shape for config entries (BerriAI/litellm#32292). Add the
field to every oauth2 config example, update the mcp_oauth config
reference row from optional-with-inference to required, and map each
flow to its value in the flow comparison table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Jul 8, 2026 12:58am

Request Review

@tin-berri
tin-berri merged commit 9864398 into main Jul 8, 2026
3 checks passed
@tin-berri
tin-berri deleted the litellm_docs-mcp-oauth2-flow-required branch July 8, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant